package com.services;

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import com.Constants;
import com.factory.Util;

import model.Cinema;
import model.User;

@Stateless
public class CinemaService 
{
	@PersistenceContext(unitName = "cinema-unit")
	private EntityManager em;
	
	public List<Cinema> getAllCinemas() 
	{
		Query q = em.createNamedQuery("Cinema.findAll");

		List<Cinema> result = q.getResultList();
		
		return result;
	}
}
